function main() {
    debugger
    const self = this;
    const formPartEle = self.$$element("form_part_h67bpp");
    const formEle = formPartEle.$$getRenderElement();
    formEle.$$validateData().then((res) => {
        if (!res.success) {
            return;
        } else {
            let lawTypeValue = self.$$("single_select_1t135a").cValue;
            let lawContentValue = self.$$("textarea_6lpsuf").cValue;
            let titleValue = self.$$("single_select_4lmqyv").textData.props.defaultValue.value;
            let batchTypeValue = 2;
            let codeValue = self.$$("single_select_4lmqyv").cValue;
            batchImportHandler(lawTypeValue, lawContentValue, titleValue, batchTypeValue, codeValue).then(r => {
                self.$message.success("导入成功");
                self.$$("single_select_1t135a").cValue = null;
                self.$$("textarea_6lpsuf").cValue = null;
                self.$$("single_select_4lmqyv").textData.props.defaultValue.value = null;
                self.$$("single_select_4lmqyv").cValue = null;
            })
        }
    });


}


function batchImportHandler(lawTypeValue, lawContentValue, titleValue, batchTypeValue, codeValue) {
    const formParams = [
        {name: "lawType", type: "FormData", valueContent: lawTypeValue},
        {name: "lawContent", type: "FormData", valueContent: lawContentValue},
        {name: "title", type: "FormData", valueContent: titleValue},
        {name: "batchType", type: "FormData", valueContent: batchTypeValue},
        {name: "code", type: "FormData", valueContent: codeValue}
    ];
    return new Promise((resolve, reject) => {
        api.DATA_SOURCE_EXECUTE("ds_api:84a4cc20-4c91-41eb-91a5-09ef2bd09ec8", "api", [], formParams, "").then((res) => {
            resolve(res)
        }).catch(err => {
            self.$message.error(err.message);
        });
    });

}
